const path = require('path');


//定义文件的存放路径
// path.basename拿到文件名
const fpath = '/a/b/c/index.html';


const fullName = path.basename(fpath);
console.log(fullName);


const nameWithOutExt = path.basename(fpath, '.html');
console.log(nameWithOutExt);